# 会员信息类

class Person(object):
    def __init__(self, id, name, password, sex, bir, rank, score):
        self.id = id  # 编号
        self.name = name  # 姓名
        self.password = password  # 密码
        self.sex = sex  # 性别
        self.bir = bir  # 生日
        self.rank = rank  # 等级
        self.score = score  # 积分


person_list = []  # Person对象列表


def initData(filename='data/vip_data.csv'):
    with open(filename, 'r+', encoding='utf-8') as f:
        # read_data = f.read()  # 读取每行文字作为字符串
        data = [i[:-1].split(',') for i in f.readlines()]  # 读取每一行并用','划分
        for item in data:
            person_list.append(Person(item[0], item[1], item[2], item[3], item[4], item[5], item[6]))


if __name__ == '__main__':
    initData("data/vip_data.csv")
